package com.huaxin.hxmodulesystem.mapping;

import com.huaxin.hxmodulesystem.dto.request.AddPermissionReqDTO;
import com.huaxin.hxmodulesystem.dto.request.UpdatePermissionReqDTO;
import com.huaxin.hxmodulesystem.models.Permission;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

@Mapper(componentModel = "spring")
public interface PermissionMapping {

    Permission toEntity(AddPermissionReqDTO in);

    void updateEntity(UpdatePermissionReqDTO in, @MappingTarget Permission entity);
}